package com.lysj.admin.master.bussiness.company.company.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.lysj.admin.master.common.enumeration.EnumInterface;
import com.lysj.admin.master.common.spring.mpbase.MyEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * @author Created by drj on 2019-12-27 15:02
 * @description 佣金发放详情
 */
@Data
@Entity
@EqualsAndHashCode(callSuper = true)
@TableName("lysj_company_commission_detail")
@Table(name = "lysj_company_commission_detail",
        indexes = {@Index(name = "idx_commission_apply_id", columnList = "commissionApplyId")})
public class CommissionDetail extends MyEntity {

    @AllArgsConstructor
    @Getter
    public enum CommissionStatus implements EnumInterface {
        NO_GRANT(1, "待发单"),//订单审核中
        NO_RECEIVE(2, "待接单"),
        RECEIVE(3,"已接单"),
        NO_AUDIT(4,"待审核"),
        FINISH(5, "完成")//接单并提交工作证明
        ;
        private Integer code;
        private String status;
    }

    private String accountName;//收款方账户名称

    private String bank; //开户银行

    private String bankName;//开户行全称

    private String idNum;//身份证

    private String account;// 收款方账号

    @Column(columnDefinition = "decimal(10,2)")
    private BigDecimal actPayPrice;// 实发金额

    private String phone;// 实名手机号

    private String remark;//款项属性

    private String commissionApplyId;//发放申请id

    private String signId;//签名图Id

    private String proof;//凭证截图id拼接 A-B-C-D

    private String reason;//驳回理由

    private Boolean validFlag;//校验标识

    private Integer commissionStatus;//接单状态
}
